package com.ciaojian.client.controller;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.ciaojian.client.model.param.GetHairArchiveDTO;
import com.ciaojian.client.service.HairArchiveServiceImpl;
import com.ciaojian.core.model.HairArchive;
import com.ciaojian.core.util.Result;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.AllArgsConstructor;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author oxiny
 */
@Api(tags = "用户模块: 发型档案")
@AllArgsConstructor
@RestController
@RequestMapping("/user/hair-archive")
public class HairArchiveController {
    private final HairArchiveServiceImpl hairArchiveService;

    @ApiOperation("分页查询")
    @GetMapping("/page")
    public Result list(GetHairArchiveDTO getHairArchiveDTO) {
        Page<HairArchive> page = hairArchiveService.pageByUid(getHairArchiveDTO.page(), getHairArchiveDTO.getUserId());
        return Result.ok(page);
    }
}








